package com.tg.paw.ums.enmus;

import lombok.Getter;

/**
 * @author Rubble
 * @date 2020/10/24
 */
@Getter
public enum PermissionButtonEnum {
    /**
     * "query", "add", "delete", "edit", "import", "export"
     */
    QUERY("query","查看"),
    ADD("add","增加"),
    DELETE("delete","删除"),
    EDIT("edit","修改"),
    IMPORT("import","导入"),
    EXPORT("export","导出"),
    ;

    private String value;

    private String label;

    PermissionButtonEnum(String value,String label){
        this.value = value;
        this.label = label;
    }

    public static PermissionButtonEnum getByValue(String value){
        for (PermissionButtonEnum item : PermissionButtonEnum.values()) {
            if(item.getValue().equals(value)){
                return item;
            }
        }
        return null;
    }




}
